package com.mornd.gulimall.apis.ware.to;

import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author: mornd
 * @dateTime: 2023/8/23 - 13:38
 * 订单库存锁定结果
 */

@Data
public class OrderLockStockResult implements Serializable {
    // 是否锁定成功
    private boolean locked = true;
    // 锁定失败的skuId
    private Long failSkuId;
    // 失败原因
    private String failMsg;
    // 锁定成功的数据
    List<Sku> skus = new ArrayList<>();

    @Data
    public static class Sku {
        private Long skuId;
        private Long stockId;
    }
}
